J.L.Xg.nh = J.L.If.extend({
    o: function(a, b) {
        arguments.callee.Ja.apply(this, arguments);
        this.Ad()
    },
    hv: function() {
        return this.lb.Dx
    },
    re: function() {
        return this.ka
    },
    Ad: function() {
        this.ka = document.createElement("div");
        this.lb = new J.L.Xg.nc(this.ka);
        this.lb.I = this.I;
        this.no.u.appendChild(this.ka)
    },
    hl: function(a, b) {
        this.um = b.um;
        this.Lk = b;
        this.yc = a.sa.yc;
        this.N = a.sa.N;
        this.zoom = a.sa.zoom;
        this.size = a.size;
        this.Ha = a.Ha;
        this.ra = a.sa.Oa;
        this.Kg = a.sa.Kg;
        var c = !1;
        if (!this.U || 3E4 < Math.abs(this.ra.x - this.U.x) / this.N || 3E4 < Math.abs(this.ra.y - this.U.y) / this.N) c = !0;
        if (c || this.zoom << 0 !== this.zoom || this.bd !== this.zoom) this.U = this.ra,
            this.bd = this.zoom
    },
    Fp: function(a) {
        var b = a.Ha.Ya.y * this.N;
        a = a.Ha.Ya.x * this.N;
        return [this.ra.x - a, this.ra.y - b, this.ra.x + a, this.ra.y + b]
    },
    mi: function() {
        if (this.bf && this.bf) for (var a in this.bf) if (this.bf.hasOwnProperty(a)) {
            var b = this.bf[a];
            b.Bc !== this.Bc && b.H && this.no.Hi.appendChild(b.H)
        }
    },
    Mc: function(a, b) {
        this.Bc = 1E6 * Math.random() << 0;
        this.hl(a, b);
        this.sa = a.sa;
        this.size = a.size;
        var c = this.I;
        this.ib = 256;
        var d, f;
        f = this.Fp(a);
        var g = 0;
        c.Bk && (g = 50 * this.N);
        f[0] -= this.I.Af * this.N + g;
        f[1] -= this.I.Bf * this.N + g;
        f[2] += this.I.Af * this.N + g;
        f[3] += this.I.Bf * this.N + g;
        c = c.Ue(f);
        for (d in c) c.hasOwnProperty(d) && (c[d].Bc = this.Bc);
        this.mi(c);
        this.hl.call(this.lb, a, b);
        this.lb.fG(c);
        this.bf = c;
        this.tc(a)
    },
    tc: function() {
        var a = Math.pow(2, this.zoom - this.qb);
        this.transform = {
            translate: this.U.Ba(this.ra).tb(this.N),
            scale: a,
            rotate: 0
        }
    }
});
J.L.Xg.nc = J.P.extend({
    o: function(a) {
        this.kj = a
    },
    fG: function(a) {
        var b = document.createDocumentFragment(),
            c;
        for (c in a) if (a.hasOwnProperty(c)) {
            var d = a[c],
                f,
                g = d.get("params");
            if (d.H) f = d.H;
            else {
                f = J.a.create("div");
                f.className = "amap-marker";
                var h = g.Og,
                    k = g.GG;
                h && f.appendChild(h);
                k && f.appendChild(k);
                d.H = f;
                d.Og = h;
                if (k = g.title) h.title = k;
                this.I.Bk = !0;
                this.I.jj.push(d);
                d.Pe = !0
            }
            var h = g.offset,
                k = h.x,
                l = h.y,
                m, n;
            if (d.Pe) {
                var q = [];
                m = this.ob(d.ta.Pa);
                d.U = this.U;
                n = g.nr;
                h = Math.round(m[1] + l + n.y);
                m = Math.round(m[0] + k + n.x);
                q.push("top:" + h + "px");
                q.push("left:" + m + "px");
                q.push("z-index:" + (g.HE ? this.xK + 10 : g.zIndex));
                J.f.vc || q.push(J.a.aE(f, g.bu, {
                    x: -k,
                    y: -l
                }));
                q.push("display:" + (g.visible ? "block": "none") + ";");
                f.style.cssText = q.join(";"); (k = g.label) && k.content && (g = g.KE, m = h = 0, k.offset && (h = k.offset.y + "px", m = k.offset.x + "px"), g.style.top = h, g.style.left = m, f.appendChild(g))
            } else if (this.zoom << 0 !== this.zoom || d.zoom !== this.zoom || f.parentNode !== this.kj || d.U !== this.U) m = this.ob(d.ta.Pa),
                d.U = this.U,
                n = g.nr,
                h = Math.round(m[1] + l + n.y),
                m = Math.round(m[0] + k + n.x),
                f.style.top = h + "px",
                f.style.left = m + "px";
            d.zoom = this.zoom;
            f.parentNode !== this.kj && (J.f.Xc && J.e.iepngFix(f), b.appendChild(f), d.Pe = !1)
        }
        this.kj.appendChild(b)
    },
    ob: function(a) {
        return [(a[0] - this.U.x) / this.N, (a[1] - this.U.y) / this.N]
    }
});